Correct autosizing masks. Fixes #281