Fixed bug in samples