Fix has() deprecation warnings