Fix some typos and type error