reintegrating into trunk from 3.1.4-SNAPSHOT branch