fixed bug where inner deserialization loop was using index from the outer loop. DERP