Fix completion calculation