Refactor code to correct a typo.