importing changes from 1.2.0.Final to master