Applying permission check fix suggested by flaggada in github issue #24.
Merge pull request #51 from jegelstaff/permission-check-fix

Wow, can't believe this was like that for so long!
Applying permission check fix suggested by flaggada in github issue #24.