Fix incorrect protocol parsing