Termination bug fixed, sort improved, dbg_info bug fixed