unbuffer channels to prevent race condition