Fixed a bug casuing extra whitespace and newline counts to be off