fix bug overflow for print