bug in printed output