Fixed some typos and bugs.