Severe memory leaks in rig, playback, and programmer fixed