edit functionality fix