classy memory leak fix