tried to fix some bugs related to streaming, quit and multi-threading