case_type matching fix