typos and bug fix