fix NPE in ConnectionHandler