Fix leaks in MEANS command