pattern permissions fix