fixed NPE and logic in saveLastSequence in Replicator