Changed syntax for window.setTimeout