fix "panic: memory wrap"