Fix setInterval bug on server connect