JsRuntimeException ReferenceError: location is not defined