fixed autodetect bug, and unicoded strings