Fix a declaration of local variables.
Fix for stack overflow in function setTimeout.