Fixed Buggs And MemoryLeaks