Removed two memory leaks