tool switching bugfixes