Fix inaccurate comments and bug in permission checking