fix store logic.