Fixed a bug in Location.js