fix autodetect with location