fix issues with browser detection