Properly fix std::thread parameter passing
Fixes #3