Added robustness to parsing