fix history completion