Fixed a bug in Tools