print function fixes