fixed segfault when using --load-circuit due to double free