Fix some locals stuff relating to protocols