fixed branch and submodule handling