Fixed mask clipping caused by use of reference