fixing bug in toolbox