Fix restoring session