Fix bug where measurements are not calibrated.

Adds tests for proper ordering as well