Edit logic fix