more terminal fixes