Removed redundant comparison in innerJoin function