Fixed bug related to using default protocol instead of real one in validation code