modify memory leaks bug