Fix device retrieval