Fixed mobile detect

Closes #589