Fixed leak and ownership issue in editlist