fix adapter count ==0 bug