Fixing a memory access bug.