fixed some postgres stuff