Fixed a mobile detection bug that was causing a javascript error