Fixed to shutdown bit.
Fixed incoming statechanges not to propagate back out; may fix issue #33.