Added timeout to connection.