Better error messages during unification