Fix more serialization bugs
Fix bug in invariant check prompt; add blackhole check