Fixed memory leaks in recovery menu