fix a couple of more obscure failure cases.