fixes issue when either one of of min or max value is not set.