Merging fixes from 3.3.x to master