fix bugs in rel union