fix threading bugs, add further HTML controls