Add repr to Device
Fix deadlock in RETURN_BOOL