Fix for array index