fix service edit function