Fix some spelling and code errors in the example