Fix replace of legacy package.