Fix some bugs on stats and comparison data