fix some error messaging