fixed error message to no longer alert and inject given message