Some terminal fixes