fix history stuff