Merge pull request #1013 from kalxas/master

fix for postgres issue and permissions #938