fix permission check
Merge pull request #1 from AndreaCattaneo/develop

fix permission check