Fixed tests not passing on postgresql.