change some API
fix a bug