Try to avoid a race condition with port publishing