improved submodule handling