fixed bug where barchart would be messed up in small terminal windows