Fix JavaScript error (local page URL)