Fixed bugs in cuttool