fixing history and bookmarking issue