Corrected setInterval's clear function