finally fixed memory access bug