fix replica tests