Parsing bug corrected

- null reference error corrected
- wrong list size check corrected