Fix error of postSaveHook()