Fixed a bug in completions plugin