Fix theme history state from being replaced