Fixed bug which caused crash on protocol initialization