Added event listener for page title change. Fixed history.pushState bug