Change code for tools. stop reading previous used tool