Fix bug in memento