fix misusage of window.console methods