Fixed some typos.

While reading the documentation, I found a typo and a code error.