Fix crasher if card out of index or not an integer