Removes JS alerts for flag error messages.