fix mask checking target (fixed #1)