Attempting to correct a memory leak in ticket #189.