Fixed replacing item dialog issue