Correct leaks in the server