fixed a bug in series query