fix for history state