Fix iOS simulator crash, reorder defined