Fix deprecated function issue.
Fix typo.