fixing the way variations are saved, updated, and deleted