fix detecting browser type