[#57] Fixed errors in thread service.