Bug fixes in AdManager