Updated connection script