When filling the parser buffer with EOL the last element was left untouched causing unexpected behavior.
Removed unused import, changed EOL back to -1