Fix: remote and local sequence numbers are now calculated correctly.