fix filtering of stats