little fix for statistics page
better encoding for models