Fixed a minor memory access issue