fix bug where history location does not account for root URL