fixed issue with brocken history.back()