bug fix for terminal console