Add finalize_rand() to prove we have no leaks