Fix autodetection