fix advertisement without console.log to prevent memory fault