Fixed issue #172
Fixed issue #181
Merge branch 'release-1.2.x'