Improvements in streaming, bugfix in downloadbyjsonquery