fix mem-leakage, see performance improve