fixed missing device initialization