trying fixing hasPermission