Fix bug in tool watching.