nicer error messages in some places