Fix for thread not being properly started.