Fixed a bug in setting up protocol lookup