external script stays in <defunct> state after executing