advgenerator fix (links not generated first time)