fix double message on connection and fix #15