Fixed array range issue