Fixed some typos that were causing bugs.