Bug fix: remove global variables in tape measure.