fix error with structSaver and hooks