Fixes from merging, and fixed permissions