Fix measurement calculation