Fixed a bug in restart_picflow