memory leak fix

memory leak fix