IDEX-1619: Added ability to replace element with new one