Fixed a bug where once x amount of threads are created, the program crashes. This was being caused due to the threads not being detached.