Fixed free according to valgrind