fixing issue with division operation causing non-integer array accessors