Fix some corner cases in :print after the recent changes