Fix race condition in courier init