Migration fixes. Added session saving.