Fix bug where 2 tests for nice fail

This issue is caused by the current thread being used instead of the thread
that is passed to the function. After this fix, passes all 27 tests.