Fix for assertion error, and for strange error message from compares.