onLoad correctly unsets entities and exchanges array