Fix of protocol guessing