fix get device by device name bug