Try to keep thread contexts in sync