Fixed race condition: connect vs device load (pimatic/pimatic#299)