Fix bug: crashes if no lines were read