fix restart crash error