fix: wait for ending render prev template