Fix getting AD object