fix replica length check for replicate > 2