fix bug in _label_tool_data
fix bug in is_tool_done and clean up tool_cache usage in general