fix bug with minimum nodes usge