Added wrap for larger than size values of index