Fix error when protocol is not passed