updated to check for empty array and not use User Agent check

updated to check for empty array from @savetheclocktower instead of a
user agent sniff