fix another segfault in edscript()