fixed memory leak in block deletion