Add scope to for-loop variables and add a missing semicolon