fixed errors introduced by location.js
Merge pull request #33 from ysubtle/master

fixed errors introduced by location.js