Remove deprecated and memory leak fix