Fixed Postgres incompatability