fixed some bugs a around the tools