Fix to postgres delete