Fixed bug, memory leak