fix protocol undefined