Fix close masure area tab and masure

After latest fix with those tools, they are not working correct. Click measure, next click measure area, and later click measure. After those steps measure area tool hangs.