Fix bugs and update submodules