Fix error state handling when polling switches.

Change-Id: Ic0517a05f521541ce3198bb4eac1874c3049ac6a