Fixed some bugs with the client/server