More robust parser