fix modal deactivation