Device name check bug fix