WIP: avoid crashing in the lack of enough samples