Fix ARM compatibility issues