Fixing permission tests