fixed parsing, added pong gateway reply