Fixed permissions and some tests.
Fixed boolean expression
Fixed a typo
fix: resolved conflict