fixes non-failure-despite-failure issue

Without this fix, under certain circumstances, writing of the
controller may fail, but this would not be propagated to the user
properly. This makes the program fail as expected.

This is a first step to fixing the timeout/loopback issue,
which is not addressed by this, though.