Permissions fix #2

Bit of an emergency fix . I haven't tested it yet. As suggested by Ezio