fixes for terminal