fix a bug saving state for un-realized tabs