Fixed Memery Leaks