revert changes to adverts.js
Fixing bugs