fixed some typos and type errors