fix race conditions after asyncConnect