fix autodetector