Win10 auto restart happens when plotting