Fixed make_mask