Darn javascript scoping...

it has been tricking people since the 90s.