add fix where connection can be null when subscribing.
add fix where connection can be null when subscribing.