fix to detect basearch.