fixed error messages for ajax requests