fixed som memory leaks
master into branch
forgot a class
mermory leaks "fixes"