fixed postgres thing for joins