fix problem where JS GUI fails to recognise locations and only chooses localhost
Merge pull request #1263 from ahgittin/misc-fix-js

fix problem where JS GUI fails to recognise locations and only chooses localhost