These fixes avoid having the session items in an invalid state if their activation fails for some reason.