Fix for null adapter case.