finally got autodetect working