coding unit test for standard permissions, and some fixes