fix bug in handling arch