fixed creating new thread issue