Fix bug in network protocol typing