fix when to connect