Fix type of mem/cpu.