Fixing issue with history