prim: fix running simulation with large non-existent root (segfault)