fix extreme memory leak