Fixed Thread issue