Minor refactor
Fix bug on permission granted method