completer: fix possible crash. Close #237