Fix bugs in --with