prevent race condition when deleting all tools. Fix issue #69