Update Robit.h

Fix thread variable scoping issues