fixed bug in browser detection