Adds optional limit to the sequence_number