measurement bug fixes and formating