fixed error messaging