a tiny bit more cleanup, trying to make error messages better