Fix to allow persistence

I tried using localstorage api, but you cannot store the object and retrieve it. Maybe IndexedDB would work, but this hack works just as well at grabbing a refrence, even if the parent page was refreshed.