fixed printing bug