fixes mask problems