Fix packets not being sent to the server, and some packet fixes