Fixed onpopstate event handling and router start/stop.