safely upgrade old sessions