Fix to text parsing