fixed all the postgres issues hopefully