Fixed a memory leaks (weird that I forgot it)