Fix some issues with printing