Fix type definition order bug.