enabling auto reconnect