fixed some other broken stuff as changed to pg 9.1