Fix problem with procedure for deleting submodules.