fix broken arch-specific handling