Fixed memory leak from bug #622040