Device detection

Checking if running on a device or via a browser was not working correctly, so now using the correct variable.