Fix Memory leak in load