fixed missed if nothing to be done

fixed missed if nothing to be done