fix newline discrepancy in print()