Added error for when no samples are retained.