Fixed restarting and optimized redrawing