small bug fix in completion.py