Fix save and edit function within the Task service