Fixed some error in UnionIV()

Hi Matt, I fixed a bug in this file here! Please incorporate it into the main lab codebase.

Yours faithfully,

Julien