fix bug with store affiliation is nil