Fixed bug where terminal would be have lots of blank spaces after exit, see http://i.imgur.com/hqCxtnO.png