Moved opening of the stream to after the subscription is created

#2542 #2541