Added postgres fixes