if logic fixes for handling different streaming cases