Restoring selection after goind back/forward