Fix similarity cache problem.