Hopefully fixed problem with pg database access