Finish replacing template