Fix some bugs connect and reg local