fixed an error when handling PING-requests.