Trivial refactoring

- remove redundant loop
- fix typo