minor changes to mainthread