Fixed bug in Mask.shape