Fixes for restart/stop.