output printing bug