Small bug in function _sortByContrib and small change in monthly stats

Only a small bug fix an little enhancement in monthly stats