fix terminal output