Corrected problems on HGServerProtocol class

Corrected problems on HGServerProtocol class