Fixed thread related crash