Fixed changing thread type
Copied discussion tests from upstream