Better fix for setInterval