Fixed a bug with no samples