trying fix hasPermission