Fixed all memleaks