Two fixes for error messages