Fix typos and bugs.