fixed memory leak - missing delete