fix issue when createEach gets undefined values