Prevent modal from closing on error