fixed postgres issues