fixed bad revert, fixed postgres integration