Fix error handling when receiving devices [#58]