Add support for insert-replace