Added check to prevent multiple device disconnected events, fixes #118