Fix API.
Merge pull request #333 from yushijinhun/1.7-update

Fix API.