Added assertion in checkRep