fix to postgres update