Fixed the bug in Class Replica