Fixed several bugs with paging unions.