Sync changes from 0.3.2b master branch