Improvements to RectMask agal