Fix crash in current release due to wrong array index