fix restart crash