fixed promised stream incorrect state transition