fix some error reporting anomolies