fixed all "memory leaks"