fixed printing issues