Fix error messages in exceptions