Do some fixes due to protocol change