A little modification on isMobile