fixed autodetect