memory corruption fixed