Tweaking the history rollback function