Fixed merge errors: create handler before creating the measuretool