Fixed bug in ping script