fix printing bug.