Fix type check problem