fix deprecated array range syntax