fixing measurement bug