clean stateSubscription on unmounting