Add statistic code
Fix two bug in gameserver