Fix a bug where the minconf and maxconf arguments are ignored