fixed bug in restart api