Fixes to measurements API