five_thinkers: correct resource clearing