Check WaitTimeout return in test, replaced lock initialization in runtime.Register() with call to initLock()