subset statistics bug fixes