ARM detection and fixes