Fix setInterval errors