fix for crash at removing modifier