Small fixes in packet counter handling