bug fixes to measurement stuff for links