Fixed illegal memory access