fix flok exit code when spawning