fixed crash in revit relating to idle thread