Added robustness to parsing.