Ticket #395: Add automatic READ and UPDATE permissions to ROOT in the permission checks.
Ticket #395: Fixed some small bugs.