Fixed bug with the method fetchSample.