fixed bugs in ads manipulation