[18.09 backport] bugfix: fetch the right device number which great than 255 Upstream-commit: b236a1e78d35a62b164d00f4e19f59a556da8831 Component: engine