bugfixes to ping-write interface