Fixed error when stats facet is empty

Conflicts:
	tests/test_query.py