Fixing error control and typos