changed some logic for chooseNextIcon()