removed leakage of memory