[FIX] Memory leaks fixed