tiny fixes with threads