rewrite last history entry after call