fixed browser history handling