fix little bug on a sampling tools method. Now everything works fine