fixed a memory fault