Re-Added forgotten trimEOL func. Changed execution order in term_once.