fixing protocol comparison error