Fixed bug when connecting to unreachable device