bugfixing printing issues