added a one-liner to ckanext/stats/__init__.py to solve it.