Save initial document.location
Adjustments for new jj version