More robust parsing