fix autocomplete crash, fixes #59