Fixed selectJoin() condition