Fix PGSQL Bug (better use JOIN rather than ,)