Fixed threading stuff for osx