fixed all tests for postgres