Fix bug: read extra fields if flags array is shorter than fields
Merge pull request #12 from robertabcd/master

Fix bug: read extra fields if flags array is shorter than fields