Improvement for autodetection #53