Improved permissions. fixes #2