fix PingPong demo code