web bug fix - changed device to window.device