Fixed some tests that were failing on postgres