Fixing bug on protocols