fix device compile error