fixed some lint warnings

- util was declared
- i was undeclared
- fixed lint compare-warning
- old was is already defined
- added semicolon
Merge pull request #400 from coderaiser/patch-1

Fixed some lint warnings