fixed some bugs with SERIES_QUERYVAR