Fixed memory writing when using IDX (Indexed indirect method).