Added robustness to parsing.
Merge pull request #29 from marekcirkos/robustParsing

Added robustness to parsing.