Updated permission calculation in helper files