Fixes for AD.