Wrong scope for clearTimeout()