fixed reading number of samples from settings