bug fix for getStats and added to doc