Works, but spawns thread that cant yet be killed.