Fix for multiple permissions.
Merge pull request #1 from Scavenger3/patch-2

Fix for multiple permissions.