fix #4 error on connect