Fix invalid memory access for mach0s