Fixing history bug