Changing script due to errors in the execution