Fix bug with store when editing