Fixed performance leaks