Fix changing thread