Fixed global variable problem by using strict-javascript inside the execution of the code