connect() bug fixed