Attempt to fix completion function