fix mask context positioning