Fixed array access issue