fix bug on restart fail