fixed memory-leak