Fix creation of replacetort.