Fix some bugs
Add stats