Bug 1596: Fixed stats issue and NPE

Signed-off-by: Prashaanth <prashaanthr92@gmail.com>