Fixed a problem with joins on multiple columns