fixing script evaluation and execution