missed obvious bug when moving to new thread