fixed permissions and some typos