fix some bugs in the unifier but there's still something fishy there