bug fixes for ad