Working on edit event.