Fix typos in function name
Fix bug, not compatible with latest