Bug fixes and initial index-stats support