fixes for restarts
fixes for restart