fix core dump on testing script (not libinjection)