fix buggy variable and wildcard completions

Fixes #5