Fixes end of line error produced when characters trail EOF