Fix type definition parsing