fixed parsing bugs in stats