Add a default value for the sample command to use in case the weight field is invalid or zero