fix error modal not displaying correctly