Replace improvements