Mem-leak fixed