FIX: History rewrite bug fixed.