ostensibly fixed infinite loop