Fixed failing test and removed redundant thread