Fixing modal ie detection