Fix max_samples variable type, and check for out of range values.
Attach a file by drag & drop or click to upload