Change runScript to not evaluate same code twice