fix hardware type check