Fixes from 1.0.x

These fixes from RELEASE-1.0.x didn't make it into master.