Leak fixed and CRTDBG Mode added