Fixed nbt packet writing