correct load/save state