fixed various typos
fixed API change