Fixed some lint warnings

- util was declared
- i was undeclared
- fixed lint compare-warning
- old is already defined
- added semicolon