typos and bug fixes.