Use TotalPermissions from file - fixes compiling.
Merge pull request #477 from chrisgward/patch-1

Use TotalPermissions from file - fixes compiling.