Fixed another bug when restart is None