Fixed issue with returning samples.