fixed on_spawn/on_prune signatures, docs