bugfix: creating a lot of threads