Little fix so setInterval function it called properly