fixed some minor issues with masks
Merge branch '4.2' into 4.3