fixed the slow startup bug, still doesn't properly kill threads on exit