fix jump when reloading canvas