fix curves size/offset bugs

Tested for all curves (0 to 4) with 1310720
samples, multiple times acquisitions