Fix some typos, including a few that lead to non-functioning code. Change-Id: I99e6f290189ec7451a7ceffb14f5ac2a1159673f