inverting public_ami check