Fixed bug when detecting mobile devices

Previously was returning false when it actually detected a mobile device