Fixes history script.