fixed a bug in the terminal