fix for postgreSQL