Fixed an issue with improper unioning