fixed write() not sending packet ID