Fixes broken autodetect feature.

Fix #28