fixed some streaming related bug