some changes to error messaging