modify some typos and fix tests