Fix bug with sample size (limit) option