added fix to setInterval