added logic to prevent adding sample entries with invalid label (=<0)