Fixed bug in terminal