fix completion bugs.