fix in query.py/__len__