Fix bug with setTimeout, added 2sec interval