Leaks fixed

I have fixed three (possible) leaks.