Trying to get state restorator working