some terminal fixes