fix bug: did not detect last line in the table if there wasn't EOL