changes to recover session