Fix an error when no samples were found.