Fix 0-index bug

apparently the QUIDs are 1 to n not 0 to n-1