Tool modification now takes priority over tool building Also fixed a bug with output being incorrect in some occasions