Remove redundant function and fix spelling error