bugfix : slice a query raised AttributeError.