fix previous history completion