fix history index