Fixed a bug in drawTools