fixed print bugs and recover mode