stops a terminal thread
removes a reference to a serverinternalframe
fixes a thread leak #43