debugged the code for the command statistic

Change-Id: I559ccfbee4ef0e5a5fd0aa27d9dbaf36e0c0c94a