bug fixes for if unification and adding to unions