so the bug was the main thread terminated the program, doesn't wait for children, so children terminate too