Architecture detection bugfix