fixes for arch detection