missing variable declaration on for...in loop