Fixed the weird scoping within setInterval problem.
Fixed the weird scoping within setInterval problem.