Fixing an issue with the history plugin