Protect UI access with a mutex; Init some ntk stuff before UI is created