Fix assertion.
Make all the error messages consistent.