fixed errors in previous code.

spelling error and value error