fixed test for permissions