logic fix for mobile detect