Fix type matching