permission tests fixed