fix accidental double save of last key