fixed the arch detection