fix tool bug