Fix warning about missing array index