Fix upgrade script for submodules