Fixed issue caused when editing items