Ignore JSHint warning about creating functions in loops.
Add missing semicolon.