Ping/Echo fix and generalization