Several fixes on ad enumeration