Fixed bug in mask canvas.