Fixed the id restart issue