Bug fixed: If scriptEval throws error, make sure the stack is maintained properly