Fixed client/server sync bugs