Fix refresh open tabs and state.

Fixes refresh of state bug introduced in
046650ba22ac12ebb18d1eb109fe694016eb77c0.